@extends('backstage.layout.master')
@section('title', '意见反馈列表')
@section('content')
    <style>
        .state li {
            list-style: none;
            float: left;
            padding: 0 20px;
            text-align: center;
            height: 40px;
            line-height: 40px;
        }

        .state ul {
            margin: 0;
        }

        .state a {
            font-size: 12px;
        }
        .che a {
            font-weight: bold;
            color: #7c7c7c;
        }
    </style>
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try {
                ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>

            <li class="active">
                意见反馈列表
            </li>
        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
        </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <div class="page-header">
            <h1>
                意见反馈列表
            </h1>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="table-responsive">
                    <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>用户编号</th>
                            <th>姓名</th>
                            <th>联系电话</th>
                            <th>反馈内容</th>
                            <th>图片描述</th>
                            <th>操作系统</th>
                            <th>手机型号</th>
                            <th>应用版本</th>
                        </tr>
                        </thead>

                        <tbody>
                        @if(isset($result))
                            @foreach ($result as $re)
                                <tr class="">

                                    <td>
                                        {{$re->user_id}}
                                    </td>
                                    <td>
                                        {{$re->name}}
                                    </td>
                                    <td>{{$re->phone}}</td>
                                    <td>{{isset($re->body) && $re->body != '' ? pack('H*', $re->body) : ''}}</td>
                                    <td>
                                        <?php $images = json_decode($re->images,true); ?>
                                        @if($images)
                                        @foreach($images as $img)
                                            <a href="{{isset($img['original_image']) ? $img['original_image'] : ''}}"><img src="{{isset($img['thumbnail']) ? $img['thumbnail'] : ''}}" width="150px"/>
                                        @endforeach
                                        @endif
                                    </td>
                                    <td>{{$re->system}}</td>
                                    <td>{{$re->model}}</td>
                                    <td>{{$re->version}}</td>

                                </tr>
                            @endforeach
                        @else
                            <a>暂无反馈信息</a>
                        @endif
                        </tbody>
                    </table>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="dataTables_info" id="sample-table-2_info"></div>
                    </div>
                    <div class="col-sm-6">
                        <div class="dataTables_paginate paging_bootstrap">
                            @if(isset($result))
                            <?php echo $result->render(); ?>
                            @endif
                        </div>
                    </div>
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->
@stop
@section('script')
    <script type="text/javascript">
        $(function () {
            $.ajaxSetup({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                }
            });
        });
    </script>
@stop
